﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script src="../js/jquery.js"></script>
    <script src="../js/mootools.js"></script>
    <script src="../js/base.js"></script>
    <script type="text/javascript">
        var Window = new Class({
            initialize: function (ctl, txt, fun)
            {
                var me = this;
                me.Text = txt;
                $(ctl).append($("<input>", {
                    type: 'button',
                    val: "关闭",
                    click: function (evt)
                    {
                        var sender = me;
                        var e = evt;
                        fun.call(me, this, e);
                    }
                }));
            }
        });
        $(function ()
        {

            new Window("#alert", "这是一个文本框", function (sender, e) { alert(this.Text); });
        });

    </script>
</head>
<body>
    <div id="alert"></div>
</body>
</html>
